<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCommoditySearchWordsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {   //生e经宝贝搜索词
        Schema::create('commodity_search_words', function (Blueprint $table) {
            $table->increments('id');
            //宝贝ID
            $table->string('commodity_id')->nullable();
            //宝贝标题
            $table->string('commodity_title')->nullable();
            //宝贝链接
            $table->string('commodity_ur')->nullable();
            //搜索类型
            $table->string('search_type')->nullable();
            //关键词
            $table->string('keyword')->nullable();
            //直接访客数（UV）
            $table->string('direct_total_visitors')->nullable();
            //跳失率
            $table->string('loss_rate')->nullable();
            //直接销售量（件）
            $table->string('direct_sales_volume')->nullable();
            //直接转化率
            $table->string('direct_percent_conversion')->nullable();
            //间接销售量（件）
            $table->string('indirect_sales_volume')->nullable();
            //直接订单数（笔）
            $table->string('indirect_order_quantity')->nullable();
            // $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('commodity_search_words');
    }
}
